1. Field of the Invention
The present invention relates to a code image processing method for recognizing a plurality of codes and processing them together in digital image data with a plurality of codes arranged with characters and figures, and in image data read out from a document with a plurality of printed codes using an image reading device such as a digital camera and a scanner.
2. Description of the Related Art
In recent years, the popularity of two-dimensional bar codes (unless specifically noted, hereinafter referred to as “two-dimensional codes”), which can be embedded with more information than one-dimensional bar codes (unless specifically noted, hereinafter referred to as a “one-dimensional codes”), has been growing. Since two-dimensional codes cannot be recognized unless the data of the entire code is arranged two-dimensionally, image reading devices such as digital cameras, image scanners and the like have been used as reading devices.
The growing popularity of two-dimensional codes has also increased the usage of such devices not only for reading codes printed on labels for exclusive use, but also for reading codes in situations in which a given size of code is printed in a given position with characters and figures. There has also been an increase in the usage in which a plurality of two-dimensional codes are used by arranging and printing them on a single document.
FIG. 1 is a diagram showing an outline of a conventional code image processing method for recognizing a two-dimensional code from image data having a two-dimensional code called a quick response (QR) code (See Non-patent Document 1) in which code positioning symbols are placed in the upper right, upper left and lower left of the code area. Conventionally, in FIG. 1, the image data is progressively scanned one small block area 30 at a time from the upper left corner in the transverse direction. When the small block area 30 enters the space of a first two-dimensional code 40 during the scan and features of the image within the area at a position 31 in the first two-dimensional code 40 coincide with a two-dimensional code, the block area is specified as containing a code and a recognition process is performed in the areas near this block area. In cases such as this one, as shown in FIG. 1(a), there has been a problem in that even when there are a plurality of codes, recognition can only be performed for the code specified first, since when the recognition is completed, the process is terminated. There has also been a problem such that, as shown in FIG. 1(b), when the scanning is continued after the recognition and there are a plurality of small block areas 30 within the first two-dimensional code 40, multiple recognitions of the same code occur since the recognition process is carried out again because the features of the image within the area at a position 32 also coincide with a two-dimensional code. (See Patent Document 1.)
FIG. 2 is a diagram showing the outline of a conventional code image processing method for recognizing a two-dimensional code using, separately from image data with a QR code (FIG. 2(a)), a layout template recording position information of a code contained in the image data. In the example of the conventional method, as shown in FIG. 2, layout templates 80 and 90 (FIG. 2(b)) recording position information of codes 60 and 70 contained in the image data are separately provided, and the template information is referred to in the recognition process (FIG. 2(c)). In this case, a problem has arisen such that a template has to be separately created and selected every time in accordance with the document to be read. Furthermore, another problem has arisen such that read-out image data and the template have to be accurately aligned, and images have to be read using a method in which no rotation or distortion occurs in the image data. (See Patent Document 2.)
When a digital camera or an image scanner reads a document in which a given number of codes are printed in given positions with characters and figures, parts of the characters and figures are disadvantageously taken in as image data along with the two-dimensional code. For this reason, in order to recognize two-dimensional codes contained in image data, it is necessary to specify the position of each code first, and to then progressively perform a code recognition process in the areas nearby the specified position.
Patent Document 1: Japanese Patent Application filed No. 2003-408104 (Japanese Patent Application No. 2005-173646)
Patent Document 2: Japanese Patent Application No. 2000-339407 (column 2, line 50—column 3, line 20, FIG. 5)
Non-patent Document 1: JIS X0510 Two-dimensional code symbol—QR Code—Fundamental Specification Description